3.2.10 \(\int (a g+b g x) (c i+d i x) (A+B \log (e (\frac {a+b x}{c+d x})^n)) \, dx\) [110]

3.2.10.1 Optimal result
3.2.10.2 Mathematica [A] (verified)
3.2.10.3 Rubi [A] (verified)
3.2.10.4 Maple [B] (verified)
3.2.10.5 Fricas [B] (verification not implemented)
3.2.10.6 Sympy [B] (verification not implemented)
3.2.10.7 Maxima [B] (verification not implemented)
3.2.10.8 Giac [B] (verification not implemented)
3.2.10.9 Mupad [B] (verification not implemented)

3.2.10.1 Optimal result

Integrand size = 39, antiderivative size = 149 \[ \int (a g+b g x) (c i+d i x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=-\frac {B (b c-a d)^2 g i n x}{6 b d}+\frac {g i (a+b x)^2 (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 b}+\frac {(b c-a d) g i (a+b x)^2 \left (A-B n+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{6 b^2}+\frac {B (b c-a d)^3 g i n \log (c+d x)}{6 b^2 d^2} \]

output
-1/6*B*(-a*d+b*c)^2*g*i*n*x/b/d+1/3*g*i*(b*x+a)^2*(d*x+c)*(A+B*ln(e*((b*x+ 
a)/(d*x+c))^n))/b+1/6*(-a*d+b*c)*g*i*(b*x+a)^2*(A-B*n+B*ln(e*((b*x+a)/(d*x 
+c))^n))/b^2+1/6*B*(-a*d+b*c)^3*g*i*n*ln(d*x+c)/b^2/d^2
 
3.2.10.2 Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.27 \[ \int (a g+b g x) (c i+d i x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\frac {g i \left (-a^2 B d^2 (3 b c+a d) n \log (a+b x)+b \left (d x \left (a^2 B d^2 n-b^2 B c n (c+d x)+A b^2 d x (3 c+2 d x)+a b d (6 A c+3 A d x+B d n x)\right )+B d^2 \left (6 a^2 c+3 a b x (2 c+d x)+b^2 x^2 (3 c+2 d x)\right ) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+B c \left (b^2 c^2-3 a b c d+6 a^2 d^2\right ) n \log (c+d x)\right )\right )}{6 b^2 d^2} \]

input
Integrate[(a*g + b*g*x)*(c*i + d*i*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n 
]),x]
 
output
(g*i*(-(a^2*B*d^2*(3*b*c + a*d)*n*Log[a + b*x]) + b*(d*x*(a^2*B*d^2*n - b^ 
2*B*c*n*(c + d*x) + A*b^2*d*x*(3*c + 2*d*x) + a*b*d*(6*A*c + 3*A*d*x + B*d 
*n*x)) + B*d^2*(6*a^2*c + 3*a*b*x*(2*c + d*x) + b^2*x^2*(3*c + 2*d*x))*Log 
[e*((a + b*x)/(c + d*x))^n] + B*c*(b^2*c^2 - 3*a*b*c*d + 6*a^2*d^2)*n*Log[ 
c + d*x])))/(6*b^2*d^2)
 
3.2.10.3 Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 145, normalized size of antiderivative = 0.97, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {2959, 27, 2947, 49, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (a g+b g x) (c i+d i x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right ) \, dx\)

\(\Big \downarrow \) 2959

\(\displaystyle \frac {i (b c-a d) \int g (a+b x) \left (A-B n+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )dx}{3 b}+\frac {g i (a+b x)^2 (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 b}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {g i (b c-a d) \int (a+b x) \left (A-B n+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )dx}{3 b}+\frac {g i (a+b x)^2 (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 b}\)

\(\Big \downarrow \) 2947

\(\displaystyle \frac {g i (b c-a d) \left (\frac {(a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A-B n\right )}{2 b}-\frac {B n (b c-a d) \int \frac {a+b x}{c+d x}dx}{2 b}\right )}{3 b}+\frac {g i (a+b x)^2 (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 b}\)

\(\Big \downarrow \) 49

\(\displaystyle \frac {g i (b c-a d) \left (\frac {(a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A-B n\right )}{2 b}-\frac {B n (b c-a d) \int \left (\frac {b}{d}+\frac {a d-b c}{d (c+d x)}\right )dx}{2 b}\right )}{3 b}+\frac {g i (a+b x)^2 (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 b}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {g i (b c-a d) \left (\frac {(a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A-B n\right )}{2 b}-\frac {B n (b c-a d) \left (\frac {b x}{d}-\frac {(b c-a d) \log (c+d x)}{d^2}\right )}{2 b}\right )}{3 b}+\frac {g i (a+b x)^2 (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 b}\)

input
Int[(a*g + b*g*x)*(c*i + d*i*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]),x]
 
output
(g*i*(a + b*x)^2*(c + d*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(3*b) + 
 ((b*c - a*d)*g*i*(((a + b*x)^2*(A - B*n + B*Log[e*((a + b*x)/(c + d*x))^n 
]))/(2*b) - (B*(b*c - a*d)*n*((b*x)/d - ((b*c - a*d)*Log[c + d*x])/d^2))/( 
2*b)))/(3*b)
 

3.2.10.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 49
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int 
[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] 
&& IGtQ[m, 0] && IGtQ[m + n + 2, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2947
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(f + g*x)^(m + 1)*((A + 
 B*Log[e*((a + b*x)/(c + d*x))^n])/(g*(m + 1))), x] - Simp[B*n*((b*c - a*d) 
/(g*(m + 1)))   Int[(f + g*x)^(m + 1)/((a + b*x)*(c + d*x)), x], x] /; Free 
Q[{a, b, c, d, e, f, g, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] 
&& NeQ[m, -2]
 

rule 2959
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_)), x_Symbol] :> Simp[(f 
 + g*x)^(m + 1)*(h + i*x)*((A + B*Log[e*((a + b*x)/(c + d*x))^n])/(g*(m + 2 
))), x] + Simp[i*((b*c - a*d)/(b*d*(m + 2)))   Int[(f + g*x)^m*(A - B*n + B 
*Log[e*((a + b*x)/(c + d*x))^n]), x], x] /; FreeQ[{a, b, c, d, e, f, g, h, 
i, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[b*f - a*g, 0] && EqQ[d*h - c 
*i, 0] && IGtQ[m, -2]
 
3.2.10.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(506\) vs. \(2(141)=282\).

Time = 1.72 (sec) , antiderivative size = 507, normalized size of antiderivative = 3.40

method result size
parallelrisch \(\frac {6 B x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{2} c \,d^{2} g i n +2 B \,x^{3} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{3} d^{3} g i n +3 B \,x^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{3} c \,d^{2} g i n +6 A x a \,b^{2} c \,d^{2} g i n +3 B \,x^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{2} d^{3} g i n +3 B \ln \left (b x +a \right ) a^{2} b c \,d^{2} g i \,n^{2}-3 B \ln \left (b x +a \right ) a \,b^{2} c^{2} d g i \,n^{2}+3 B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{2} c^{2} d g i n -2 B \,a^{2} b c \,d^{2} g i \,n^{2}+2 B a \,b^{2} c^{2} d g i \,n^{2}-9 A \,a^{2} b c \,d^{2} g i n -9 A a \,b^{2} c^{2} d g i n +B \,b^{3} c^{3} g i \,n^{2}-B \,a^{3} d^{3} g i \,n^{2}+B \,x^{2} a \,b^{2} d^{3} g i \,n^{2}-B \,x^{2} b^{3} c \,d^{2} g i \,n^{2}+3 A \,x^{2} a \,b^{2} d^{3} g i n +3 A \,x^{2} b^{3} c \,d^{2} g i n +B x \,a^{2} b \,d^{3} g i \,n^{2}-B x \,b^{3} c^{2} d g i \,n^{2}-B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{3} c^{3} g i n +2 A \,x^{3} b^{3} d^{3} g i n -B \ln \left (b x +a \right ) a^{3} d^{3} g i \,n^{2}+B \ln \left (b x +a \right ) b^{3} c^{3} g i \,n^{2}}{6 n \,b^{2} d^{2}}\) \(507\)

input
int((b*g*x+a*g)*(d*i*x+c*i)*(A+B*ln(e*((b*x+a)/(d*x+c))^n)),x,method=_RETU 
RNVERBOSE)
 
output
1/6*(6*B*x*ln(e*((b*x+a)/(d*x+c))^n)*a*b^2*c*d^2*g*i*n+2*B*x^3*ln(e*((b*x+ 
a)/(d*x+c))^n)*b^3*d^3*g*i*n+3*B*x^2*ln(e*((b*x+a)/(d*x+c))^n)*b^3*c*d^2*g 
*i*n+6*A*x*a*b^2*c*d^2*g*i*n+3*B*x^2*ln(e*((b*x+a)/(d*x+c))^n)*a*b^2*d^3*g 
*i*n+3*B*ln(b*x+a)*a^2*b*c*d^2*g*i*n^2-3*B*ln(b*x+a)*a*b^2*c^2*d*g*i*n^2+3 
*B*ln(e*((b*x+a)/(d*x+c))^n)*a*b^2*c^2*d*g*i*n-2*B*a^2*b*c*d^2*g*i*n^2+2*B 
*a*b^2*c^2*d*g*i*n^2-9*A*a^2*b*c*d^2*g*i*n-9*A*a*b^2*c^2*d*g*i*n+B*b^3*c^3 
*g*i*n^2-B*a^3*d^3*g*i*n^2+B*x^2*a*b^2*d^3*g*i*n^2-B*x^2*b^3*c*d^2*g*i*n^2 
+3*A*x^2*a*b^2*d^3*g*i*n+3*A*x^2*b^3*c*d^2*g*i*n+B*x*a^2*b*d^3*g*i*n^2-B*x 
*b^3*c^2*d*g*i*n^2-B*ln(e*((b*x+a)/(d*x+c))^n)*b^3*c^3*g*i*n+2*A*x^3*b^3*d 
^3*g*i*n-B*ln(b*x+a)*a^3*d^3*g*i*n^2+B*ln(b*x+a)*b^3*c^3*g*i*n^2)/n/b^2/d^ 
2
 
3.2.10.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 309 vs. \(2 (143) = 286\).

Time = 0.37 (sec) , antiderivative size = 309, normalized size of antiderivative = 2.07 \[ \int (a g+b g x) (c i+d i x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\frac {2 \, A b^{3} d^{3} g i x^{3} + {\left (3 \, B a^{2} b c d^{2} - B a^{3} d^{3}\right )} g i n \log \left (b x + a\right ) + {\left (B b^{3} c^{3} - 3 \, B a b^{2} c^{2} d\right )} g i n \log \left (d x + c\right ) - {\left ({\left (B b^{3} c d^{2} - B a b^{2} d^{3}\right )} g i n - 3 \, {\left (A b^{3} c d^{2} + A a b^{2} d^{3}\right )} g i\right )} x^{2} + {\left (6 \, A a b^{2} c d^{2} g i - {\left (B b^{3} c^{2} d - B a^{2} b d^{3}\right )} g i n\right )} x + {\left (2 \, B b^{3} d^{3} g i x^{3} + 6 \, B a b^{2} c d^{2} g i x + 3 \, {\left (B b^{3} c d^{2} + B a b^{2} d^{3}\right )} g i x^{2}\right )} \log \left (e\right ) + {\left (2 \, B b^{3} d^{3} g i n x^{3} + 6 \, B a b^{2} c d^{2} g i n x + 3 \, {\left (B b^{3} c d^{2} + B a b^{2} d^{3}\right )} g i n x^{2}\right )} \log \left (\frac {b x + a}{d x + c}\right )}{6 \, b^{2} d^{2}} \]

input
integrate((b*g*x+a*g)*(d*i*x+c*i)*(A+B*log(e*((b*x+a)/(d*x+c))^n)),x, algo 
rithm="fricas")
 
output
1/6*(2*A*b^3*d^3*g*i*x^3 + (3*B*a^2*b*c*d^2 - B*a^3*d^3)*g*i*n*log(b*x + a 
) + (B*b^3*c^3 - 3*B*a*b^2*c^2*d)*g*i*n*log(d*x + c) - ((B*b^3*c*d^2 - B*a 
*b^2*d^3)*g*i*n - 3*(A*b^3*c*d^2 + A*a*b^2*d^3)*g*i)*x^2 + (6*A*a*b^2*c*d^ 
2*g*i - (B*b^3*c^2*d - B*a^2*b*d^3)*g*i*n)*x + (2*B*b^3*d^3*g*i*x^3 + 6*B* 
a*b^2*c*d^2*g*i*x + 3*(B*b^3*c*d^2 + B*a*b^2*d^3)*g*i*x^2)*log(e) + (2*B*b 
^3*d^3*g*i*n*x^3 + 6*B*a*b^2*c*d^2*g*i*n*x + 3*(B*b^3*c*d^2 + B*a*b^2*d^3) 
*g*i*n*x^2)*log((b*x + a)/(d*x + c)))/(b^2*d^2)
 
3.2.10.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 643 vs. \(2 (134) = 268\).

Time = 19.63 (sec) , antiderivative size = 643, normalized size of antiderivative = 4.32 \[ \int (a g+b g x) (c i+d i x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\begin {cases} a c g i x \left (A + B \log {\left (e \left (\frac {a}{c}\right )^{n} \right )}\right ) & \text {for}\: b = 0 \wedge d = 0 \\a g \left (A c i x + \frac {A d i x^{2}}{2} + \frac {B c^{2} i \log {\left (e \left (\frac {a}{c + d x}\right )^{n} \right )}}{2 d} + \frac {B c i n x}{2} + B c i x \log {\left (e \left (\frac {a}{c + d x}\right )^{n} \right )} + \frac {B d i n x^{2}}{4} + \frac {B d i x^{2} \log {\left (e \left (\frac {a}{c + d x}\right )^{n} \right )}}{2}\right ) & \text {for}\: b = 0 \\c i \left (A a g x + \frac {A b g x^{2}}{2} + \frac {B a^{2} g \log {\left (e \left (\frac {a}{c} + \frac {b x}{c}\right )^{n} \right )}}{2 b} - \frac {B a g n x}{2} + B a g x \log {\left (e \left (\frac {a}{c} + \frac {b x}{c}\right )^{n} \right )} - \frac {B b g n x^{2}}{4} + \frac {B b g x^{2} \log {\left (e \left (\frac {a}{c} + \frac {b x}{c}\right )^{n} \right )}}{2}\right ) & \text {for}\: d = 0 \\A a c g i x + \frac {A a d g i x^{2}}{2} + \frac {A b c g i x^{2}}{2} + \frac {A b d g i x^{3}}{3} - \frac {B a^{3} d g i n \log {\left (\frac {c}{d} + x \right )}}{6 b^{2}} - \frac {B a^{3} d g i \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{6 b^{2}} + \frac {B a^{2} c g i n \log {\left (\frac {c}{d} + x \right )}}{2 b} + \frac {B a^{2} c g i \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{2 b} + \frac {B a^{2} d g i n x}{6 b} - \frac {B a c^{2} g i n \log {\left (\frac {c}{d} + x \right )}}{2 d} + B a c g i x \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )} + \frac {B a d g i n x^{2}}{6} + \frac {B a d g i x^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{2} + \frac {B b c^{3} g i n \log {\left (\frac {c}{d} + x \right )}}{6 d^{2}} - \frac {B b c^{2} g i n x}{6 d} - \frac {B b c g i n x^{2}}{6} + \frac {B b c g i x^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{2} + \frac {B b d g i x^{3} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{3} & \text {otherwise} \end {cases} \]

input
integrate((b*g*x+a*g)*(d*i*x+c*i)*(A+B*ln(e*((b*x+a)/(d*x+c))**n)),x)
 
output
Piecewise((a*c*g*i*x*(A + B*log(e*(a/c)**n)), Eq(b, 0) & Eq(d, 0)), (a*g*( 
A*c*i*x + A*d*i*x**2/2 + B*c**2*i*log(e*(a/(c + d*x))**n)/(2*d) + B*c*i*n* 
x/2 + B*c*i*x*log(e*(a/(c + d*x))**n) + B*d*i*n*x**2/4 + B*d*i*x**2*log(e* 
(a/(c + d*x))**n)/2), Eq(b, 0)), (c*i*(A*a*g*x + A*b*g*x**2/2 + B*a**2*g*l 
og(e*(a/c + b*x/c)**n)/(2*b) - B*a*g*n*x/2 + B*a*g*x*log(e*(a/c + b*x/c)** 
n) - B*b*g*n*x**2/4 + B*b*g*x**2*log(e*(a/c + b*x/c)**n)/2), Eq(d, 0)), (A 
*a*c*g*i*x + A*a*d*g*i*x**2/2 + A*b*c*g*i*x**2/2 + A*b*d*g*i*x**3/3 - B*a* 
*3*d*g*i*n*log(c/d + x)/(6*b**2) - B*a**3*d*g*i*log(e*(a/(c + d*x) + b*x/( 
c + d*x))**n)/(6*b**2) + B*a**2*c*g*i*n*log(c/d + x)/(2*b) + B*a**2*c*g*i* 
log(e*(a/(c + d*x) + b*x/(c + d*x))**n)/(2*b) + B*a**2*d*g*i*n*x/(6*b) - B 
*a*c**2*g*i*n*log(c/d + x)/(2*d) + B*a*c*g*i*x*log(e*(a/(c + d*x) + b*x/(c 
 + d*x))**n) + B*a*d*g*i*n*x**2/6 + B*a*d*g*i*x**2*log(e*(a/(c + d*x) + b* 
x/(c + d*x))**n)/2 + B*b*c**3*g*i*n*log(c/d + x)/(6*d**2) - B*b*c**2*g*i*n 
*x/(6*d) - B*b*c*g*i*n*x**2/6 + B*b*c*g*i*x**2*log(e*(a/(c + d*x) + b*x/(c 
 + d*x))**n)/2 + B*b*d*g*i*x**3*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)/3, 
 True))
 
3.2.10.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 393 vs. \(2 (143) = 286\).

Time = 0.20 (sec) , antiderivative size = 393, normalized size of antiderivative = 2.64 \[ \int (a g+b g x) (c i+d i x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\frac {1}{3} \, B b d g i x^{3} \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right ) + \frac {1}{3} \, A b d g i x^{3} + \frac {1}{2} \, B b c g i x^{2} \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right ) + \frac {1}{2} \, B a d g i x^{2} \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right ) + \frac {1}{2} \, A b c g i x^{2} + \frac {1}{2} \, A a d g i x^{2} + \frac {1}{6} \, B b d g i n {\left (\frac {2 \, a^{3} \log \left (b x + a\right )}{b^{3}} - \frac {2 \, c^{3} \log \left (d x + c\right )}{d^{3}} - \frac {{\left (b^{2} c d - a b d^{2}\right )} x^{2} - 2 \, {\left (b^{2} c^{2} - a^{2} d^{2}\right )} x}{b^{2} d^{2}}\right )} - \frac {1}{2} \, B b c g i n {\left (\frac {a^{2} \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c - a d\right )} x}{b d}\right )} - \frac {1}{2} \, B a d g i n {\left (\frac {a^{2} \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c - a d\right )} x}{b d}\right )} + B a c g i n {\left (\frac {a \log \left (b x + a\right )}{b} - \frac {c \log \left (d x + c\right )}{d}\right )} + B a c g i x \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right ) + A a c g i x \]

input
integrate((b*g*x+a*g)*(d*i*x+c*i)*(A+B*log(e*((b*x+a)/(d*x+c))^n)),x, algo 
rithm="maxima")
 
output
1/3*B*b*d*g*i*x^3*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + 1/3*A*b*d*g*i*x 
^3 + 1/2*B*b*c*g*i*x^2*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + 1/2*B*a*d* 
g*i*x^2*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + 1/2*A*b*c*g*i*x^2 + 1/2*A 
*a*d*g*i*x^2 + 1/6*B*b*d*g*i*n*(2*a^3*log(b*x + a)/b^3 - 2*c^3*log(d*x + c 
)/d^3 - ((b^2*c*d - a*b*d^2)*x^2 - 2*(b^2*c^2 - a^2*d^2)*x)/(b^2*d^2)) - 1 
/2*B*b*c*g*i*n*(a^2*log(b*x + a)/b^2 - c^2*log(d*x + c)/d^2 + (b*c - a*d)* 
x/(b*d)) - 1/2*B*a*d*g*i*n*(a^2*log(b*x + a)/b^2 - c^2*log(d*x + c)/d^2 + 
(b*c - a*d)*x/(b*d)) + B*a*c*g*i*n*(a*log(b*x + a)/b - c*log(d*x + c)/d) + 
 B*a*c*g*i*x*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + A*a*c*g*i*x
 
3.2.10.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1276 vs. \(2 (143) = 286\).

Time = 0.66 (sec) , antiderivative size = 1276, normalized size of antiderivative = 8.56 \[ \int (a g+b g x) (c i+d i x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\text {Too large to display} \]

input
integrate((b*g*x+a*g)*(d*i*x+c*i)*(A+B*log(e*((b*x+a)/(d*x+c))^n)),x, algo 
rithm="giac")
 
output
-1/6*((B*b^5*c^4*g*i*n - 4*B*a*b^4*c^3*d*g*i*n - 3*(b*x + a)*B*b^4*c^4*d*g 
*i*n/(d*x + c) + 6*B*a^2*b^3*c^2*d^2*g*i*n + 12*(b*x + a)*B*a*b^3*c^3*d^2* 
g*i*n/(d*x + c) - 4*B*a^3*b^2*c*d^3*g*i*n - 18*(b*x + a)*B*a^2*b^2*c^2*d^3 
*g*i*n/(d*x + c) + B*a^4*b*d^4*g*i*n + 12*(b*x + a)*B*a^3*b*c*d^4*g*i*n/(d 
*x + c) - 3*(b*x + a)*B*a^4*d^5*g*i*n/(d*x + c))*log((b*x + a)/(d*x + c))/ 
(b^3*d^2 - 3*(b*x + a)*b^2*d^3/(d*x + c) + 3*(b*x + a)^2*b*d^4/(d*x + c)^2 
 - (b*x + a)^3*d^5/(d*x + c)^3) + ((b*x + a)*B*b^5*c^4*d*g*i*n/(d*x + c) - 
 4*(b*x + a)*B*a*b^4*c^3*d^2*g*i*n/(d*x + c) - (b*x + a)^2*B*b^4*c^4*d^2*g 
*i*n/(d*x + c)^2 + 6*(b*x + a)*B*a^2*b^3*c^2*d^3*g*i*n/(d*x + c) + 4*(b*x 
+ a)^2*B*a*b^3*c^3*d^3*g*i*n/(d*x + c)^2 - 4*(b*x + a)*B*a^3*b^2*c*d^4*g*i 
*n/(d*x + c) - 6*(b*x + a)^2*B*a^2*b^2*c^2*d^4*g*i*n/(d*x + c)^2 + (b*x + 
a)*B*a^4*b*d^5*g*i*n/(d*x + c) + 4*(b*x + a)^2*B*a^3*b*c*d^5*g*i*n/(d*x + 
c)^2 - (b*x + a)^2*B*a^4*d^6*g*i*n/(d*x + c)^2 + B*b^6*c^4*g*i*log(e) - 4* 
B*a*b^5*c^3*d*g*i*log(e) - 3*(b*x + a)*B*b^5*c^4*d*g*i*log(e)/(d*x + c) + 
6*B*a^2*b^4*c^2*d^2*g*i*log(e) + 12*(b*x + a)*B*a*b^4*c^3*d^2*g*i*log(e)/( 
d*x + c) - 4*B*a^3*b^3*c*d^3*g*i*log(e) - 18*(b*x + a)*B*a^2*b^3*c^2*d^3*g 
*i*log(e)/(d*x + c) + B*a^4*b^2*d^4*g*i*log(e) + 12*(b*x + a)*B*a^3*b^2*c* 
d^4*g*i*log(e)/(d*x + c) - 3*(b*x + a)*B*a^4*b*d^5*g*i*log(e)/(d*x + c) + 
A*b^6*c^4*g*i - 4*A*a*b^5*c^3*d*g*i - 3*(b*x + a)*A*b^5*c^4*d*g*i/(d*x + c 
) + 6*A*a^2*b^4*c^2*d^2*g*i + 12*(b*x + a)*A*a*b^4*c^3*d^2*g*i/(d*x + c...
 
3.2.10.9 Mupad [B] (verification not implemented)

Time = 1.53 (sec) , antiderivative size = 295, normalized size of antiderivative = 1.98 \[ \int (a g+b g x) (c i+d i x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\,\left (\frac {B\,b\,d\,g\,i\,x^3}{3}+\frac {B\,g\,i\,\left (a\,d+b\,c\right )\,x^2}{2}+B\,a\,c\,g\,i\,x\right )-x\,\left (\frac {\left (\frac {g\,i\,\left (6\,A\,a\,d+6\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{3}-\frac {A\,g\,i\,\left (6\,a\,d+6\,b\,c\right )}{6}\right )\,\left (6\,a\,d+6\,b\,c\right )}{6\,b\,d}+A\,a\,c\,g\,i-\frac {g\,i\,\left (2\,A\,a^2\,d^2+2\,A\,b^2\,c^2+B\,a^2\,d^2\,n-B\,b^2\,c^2\,n+8\,A\,a\,b\,c\,d\right )}{2\,b\,d}\right )+x^2\,\left (\frac {g\,i\,\left (6\,A\,a\,d+6\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{6}-\frac {A\,g\,i\,\left (6\,a\,d+6\,b\,c\right )}{12}\right )-\frac {\ln \left (a+b\,x\right )\,\left (B\,a^3\,d\,g\,i\,n-3\,B\,a^2\,b\,c\,g\,i\,n\right )}{6\,b^2}+\frac {\ln \left (c+d\,x\right )\,\left (B\,b\,c^3\,g\,i\,n-3\,B\,a\,c^2\,d\,g\,i\,n\right )}{6\,d^2}+\frac {A\,b\,d\,g\,i\,x^3}{3} \]

input
int((a*g + b*g*x)*(c*i + d*i*x)*(A + B*log(e*((a + b*x)/(c + d*x))^n)),x)
 
output
log(e*((a + b*x)/(c + d*x))^n)*((B*g*i*x^2*(a*d + b*c))/2 + (B*b*d*g*i*x^3 
)/3 + B*a*c*g*i*x) - x*((((g*i*(6*A*a*d + 6*A*b*c + B*a*d*n - B*b*c*n))/3 
- (A*g*i*(6*a*d + 6*b*c))/6)*(6*a*d + 6*b*c))/(6*b*d) + A*a*c*g*i - (g*i*( 
2*A*a^2*d^2 + 2*A*b^2*c^2 + B*a^2*d^2*n - B*b^2*c^2*n + 8*A*a*b*c*d))/(2*b 
*d)) + x^2*((g*i*(6*A*a*d + 6*A*b*c + B*a*d*n - B*b*c*n))/6 - (A*g*i*(6*a* 
d + 6*b*c))/12) - (log(a + b*x)*(B*a^3*d*g*i*n - 3*B*a^2*b*c*g*i*n))/(6*b^ 
2) + (log(c + d*x)*(B*b*c^3*g*i*n - 3*B*a*c^2*d*g*i*n))/(6*d^2) + (A*b*d*g 
*i*x^3)/3